<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('账号流水明细列表')"/>
</head>
<body class="gray-bg">

<div class="container-div">
    <div class="row">
        <div class="col-sm-12 search-collapse">
            <form id="formId">
                <div class="select-list">
                    <ul>
                        <li>
                            广告主ID：<input type="text" name="advertiserId"/>
                        </li>

                        <li>
                            流水类型：<input type="text" name="transactionType"/>
                        </li>

                        <li>
                            交易流水号：<input type="text" name="transactionSeq"/>
                        </li>

                        <li>
                            付款方：<input type="text" name="remitter"/>
                        </li>

                        <li>
                            收款方：<input type="text" name="payee"/>
                        </li>

                        <li>
                            <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
                                    class="fa fa-search"></i>&nbsp;搜索</a>
                            <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
                                    class="fa fa-refresh"></i>&nbsp;重置</a>
                        </li>
                    </ul>
                </div>
            </form>
        </div>

        <div class="btn-group-sm" id="toolbar" role="group">
            <a class="btn btn-danger btn-del btn-del disabled" onclick="$.operate.removeAll()"
               shiro:hasPermission="dsp:fund:remove">
                <i class="fa fa-remove"></i> 删除
            </a>
            <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="dsp:fund:export">
                <i class="fa fa-download"></i> 导出
            </a>
        </div>
        <div class="col-sm-12 select-table table-striped">
            <table id="bootstrap-table" data-mobile-responsive="true"></table>
        </div>
    </div>
</div>
<div th:include="include :: footer"></div>
<script th:inline="javascript">
    var editFlag = [[${@permission.hasPermi('dsp:fund:edit')}]];
    var removeFlag = [[${@permission.hasPermi('dsp:fund:remove')}]];
    var prefix = ctx + "dsp/fundDailyDetail";

    $(function () {
        var options = {
            url: prefix + "/list",
            createUrl: prefix + "/add",
            updateUrl: prefix + "/edit/{id}",
            removeUrl: prefix + "/remove",
            exportUrl: prefix + "/export",
            modalName: "账号流水明细",
            search: false,
            showExport: true,
            columns: [{
                checkbox: true
            },
                {
                    field: 'id',
                    title: '表id',
                    visible: false
                },
                {
                    field: 'advertiserId',
                    title: '广告主ID',
                    sortable: true
                },
                {
                    field: 'transactionType',
                    title: '流水类型',
                    sortable: true
                },
                {
                    field: 'amount',
                    title: '交易总金额',
                    sortable: true
                },
                {
                    field: 'frozen',
                    title: '冻结总金额',
                    sortable: true
                },
                {
                    field: 'cash',
                    title: '现金总金额',
                    sortable: true
                },
                {
                    field: 'grant',
                    title: '赠款总金额',
                    sortable: true
                },
                {
                    field: 'returnGoods',
                    title: '返货总金额',
                    sortable: true
                },
                {
                    field: 'transactionSeq',
                    title: '交易流水号',
                    sortable: true
                },
                {
                    field: 'remitter',
                    title: '付款方',
                    sortable: true
                },
                {
                    field: 'payee',
                    title: '收款方',
                    sortable: true
                },
                {
                    field: 'dealbase',
                    title: '返点',
                    sortable: true
                },
                {
                    field: 'createTime',
                    title: '流水产生时间',
                    sortable: true
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function (value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
        };
        $.table.init(options);
    });
</script>
</body>
</html>